import request from '../utils/request'

export const getAddresses = () => {
  return request('/api/address', 'get')
}

/**
 * @param {Object} address - 地址详细信息1
 * @returns 地址添加信息
 */
export const addAddress = (address) => {
  return request('/api/address', 'post', address)
}

/**
 *
 * @param {Integer} address - 地址id
 * @returns
 */
export const deleteAddress = (address) => {
  return request(`/api/address/${address}`, 'DELETE')
}
